home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earkit
/
news
/
thor
/
hd-install
/
thor.lha
/
rexx
/
ShowEvent.thor
< prev
next >
Wrap
Text File
|
1996-09-26
|
2KB
|
83 lines
/*
$VER: ShowEvent.thor 1.2 (8.6.96)
by Remco van Hooff (rvhooff@globalxs.nl)
Shows the current event in the main window.
1.1 - Won't exit with an arexx error when you want to show a
deleted/unrecovarable event.
1.2 - Fixed some trouble with arexx ports when ConnectThor was running.
*/
if left(address(), 5) = 'THOR.' then thorport = address()
else do
say 'THOR port not found!'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
EDF_DELETED = '00000001'x /* Event is deleted */
EDF_UNRECOVERABLE = '00000010'x /* Event can not be undeleted */
address(thorport)
options results
GETSELECTEDEVENT
if rc = 5 then do
REQUESTNOTIFY TEXT '"The events window is not open."' BT '"_Ok"'
exit
end
if rc = 30 then do
REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
exit
end
event = result
CURRENTSYSTEM stem CURRENT
if(rc ~= 0) then do
REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
exit
end
bbs = '"'CURRENT.BBSNAME'"'
address BBSREAD
GETBBSDATA bbsname bbs stem DATA
if(rc ~= 0) then do
address(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
exit
end
path = DATA.BBSPATH
fevent = DATA.FIRSTEVENT
levent = DATA.LASTEVENT
if fevent > levent then do
address(thorport)
REQUESTNOTIFY TEXT '"No event found."' BT '"_Ok"'
exit
end
READBREVENT BBSNAME bbs EVENTNR event TAGSSTEM TAG DATASTEM EVENTDATA
if(rc ~= 0) then do
address(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
exit
end
msg = path||TAG.MSGFILE
address(thorport)
if bitand(EVENTDATA.FLAGS,(bitor(EDF_DELETED,EDF_UNRECOVERABLE))) = '00000000'x then do
SHOWTEXT file msg
if(rc ~= 0) then do
REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
exit
end
end
else REQUESTNOTIFY TEXT '"Can''t display DELETED events."' BT '"_Ok"'
exit